var Database = {
	post : function(data) {
		$.ajax({
			url : 'http://localhost:5984/nutty/', // the database
			data : JSON.stringify(data),
			contentType : "application/json",
			type : 'POST',
			dataType : "json",
			success : function(data) {
				var id = data.id;
				//alert("saved with id " + id);
				$("p.success").show().html("saved with id " + id);
			},
			error : function(jqXHR, textStatus,errorThrown) {
				$("p.error").show().html("There was an error in the database");
			}
		});
	},
	get : function(id) {
		$.ajax({
		url : 'http://localhost:5984/nutty/' + id, // the database
		type : 'GET',
		success : function(data){
			alert(data);
		}
		});
	}
};
